3.2.78 \(\int \csc ^4(e+f x) (b \tan (e+f x))^n \, dx\) [178]

Optimal. Leaf size=53 \[ -\frac {b^3 (b \tan (e+f x))^{-3+n}}{f (3-n)}-\frac {b (b \tan (e+f x))^{-1+n}}{f (1-n)} \]

[Out]

-b^3*(b*tan(f*x+e))^(-3+n)/f/(3-n)-b*(b*tan(f*x+e))^(-1+n)/f/(1-n)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2671, 14} \begin {gather*} -\frac {b^3 (b \tan (e+f x))^{n-3}}{f (3-n)}-\frac {b (b \tan (e+f x))^{n-1}}{f (1-n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^4*(b*Tan[e + f*x])^n,x]

[Out]

-((b^3*(b*Tan[e + f*x])^(-3 + n))/(f*(3 - n))) - (b*(b*Tan[e + f*x])^(-1 + n))/(f*(1 - n))

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2671

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> With[{ff = FreeFactors[Ta
n[e + f*x], x]}, Dist[b*(ff/f), Subst[Int[(ff*x)^(m + n)/(b^2 + ff^2*x^2)^(m/2 + 1), x], x, b*(Tan[e + f*x]/ff
)], x]] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2]

Rubi steps

\begin {align*} \int \csc ^4(e+f x) (b \tan (e+f x))^n \, dx &=\frac {b \text {Subst}\left (\int x^{-4+n} \left (b^2+x^2\right ) \, dx,x,b \tan (e+f x)\right )}{f}\\ &=\frac {b \text {Subst}\left (\int \left (b^2 x^{-4+n}+x^{-2+n}\right ) \, dx,x,b \tan (e+f x)\right )}{f}\\ &=-\frac {b^3 (b \tan (e+f x))^{-3+n}}{f (3-n)}-\frac {b (b \tan (e+f x))^{-1+n}}{f (1-n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.18, size = 46, normalized size = 0.87 \begin {gather*} \frac {b (-2+n+\cos (2 (e+f x))) \csc ^2(e+f x) (b \tan (e+f x))^{-1+n}}{f (-3+n) (-1+n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^4*(b*Tan[e + f*x])^n,x]

[Out]

(b*(-2 + n + Cos[2*(e + f*x)])*Csc[e + f*x]^2*(b*Tan[e + f*x])^(-1 + n))/(f*(-3 + n)*(-1 + n))

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.37, size = 5437, normalized size = 102.58

method result size
risch \(\text {Expression too large to display}\) \(5437\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^4*(b*tan(f*x+e))^n,x,method=_RETURNVERBOSE)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 59, normalized size = 1.11 \begin {gather*} \frac {\frac {b^{n} \tan \left (f x + e\right )^{n}}{{\left (n - 1\right )} \tan \left (f x + e\right )} + \frac {b^{n} \tan \left (f x + e\right )^{n}}{{\left (n - 3\right )} \tan \left (f x + e\right )^{3}}}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^4*(b*tan(f*x+e))^n,x, algorithm="maxima")

[Out]

(b^n*tan(f*x + e)^n/((n - 1)*tan(f*x + e)) + b^n*tan(f*x + e)^n/((n - 3)*tan(f*x + e)^3))/f

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 92, normalized size = 1.74 \begin {gather*} \frac {{\left (2 \, \cos \left (f x + e\right )^{3} + {\left (n - 3\right )} \cos \left (f x + e\right )\right )} \left (\frac {b \sin \left (f x + e\right )}{\cos \left (f x + e\right )}\right )^{n}}{{\left (f n^{2} - {\left (f n^{2} - 4 \, f n + 3 \, f\right )} \cos \left (f x + e\right )^{2} - 4 \, f n + 3 \, f\right )} \sin \left (f x + e\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^4*(b*tan(f*x+e))^n,x, algorithm="fricas")

[Out]

(2*cos(f*x + e)^3 + (n - 3)*cos(f*x + e))*(b*sin(f*x + e)/cos(f*x + e))^n/((f*n^2 - (f*n^2 - 4*f*n + 3*f)*cos(
f*x + e)^2 - 4*f*n + 3*f)*sin(f*x + e))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (b \tan {\left (e + f x \right )}\right )^{n} \csc ^{4}{\left (e + f x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**4*(b*tan(f*x+e))**n,x)

[Out]

Integral((b*tan(e + f*x))**n*csc(e + f*x)**4, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^4*(b*tan(f*x+e))^n,x, algorithm="giac")

[Out]

integrate((b*tan(f*x + e))^n*csc(f*x + e)^4, x)

________________________________________________________________________________________

Mupad [B]
time = 3.74, size = 138, normalized size = 2.60 \begin {gather*} -\frac {2\,{\left (-\frac {b\,\sin \left (2\,e+2\,f\,x\right )}{2\,{\sin \left (e+f\,x\right )}^2-2}\right )}^n\,\left (9\,\sin \left (2\,e+2\,f\,x\right )-6\,\sin \left (4\,e+4\,f\,x\right )+\sin \left (6\,e+6\,f\,x\right )-4\,n\,\sin \left (2\,e+2\,f\,x\right )+2\,n\,\sin \left (4\,e+4\,f\,x\right )\right )}{f\,\left (30\,{\sin \left (e+f\,x\right )}^2-12\,{\sin \left (2\,e+2\,f\,x\right )}^2+2\,{\sin \left (3\,e+3\,f\,x\right )}^2\right )\,\left (n^2-4\,n+3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*tan(e + f*x))^n/sin(e + f*x)^4,x)

[Out]

-(2*(-(b*sin(2*e + 2*f*x))/(2*sin(e + f*x)^2 - 2))^n*(9*sin(2*e + 2*f*x) - 6*sin(4*e + 4*f*x) + sin(6*e + 6*f*
x) - 4*n*sin(2*e + 2*f*x) + 2*n*sin(4*e + 4*f*x)))/(f*(2*sin(3*e + 3*f*x)^2 - 12*sin(2*e + 2*f*x)^2 + 30*sin(e
 + f*x)^2)*(n^2 - 4*n + 3))

________________________________________________________________________________________